<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Dispositivo de Estimativa Orçamentária</title>
        <link rel="stylesheet" type="text/css" href="EasyUI/themes/cupertino/easyui.css">
        <link rel="stylesheet" type="text/css" href="EasyUI/themes/icon.css">    
    </head>
    <?php
    // Set flag that this is a parent file.
    define('_JEXEC', 1);
    define('DS', DIRECTORY_SEPARATOR);
    define('JPATH_BASE', dirname(dirname(__FILE__)));

    require_once JPATH_BASE . DS . 'includes' . DS . 'defines.php';
    require_once JPATH_BASE . DS . 'includes' . DS . 'framework.php';

    $app = JFactory::getApplication('site');
    $app->initialise();

    $session = JFactory::getSession();
    $session_id = $session->get('user_id', 'empty');
    ?>    
    <body>
        <?php
        $server = $_SERVER['SERVER_NAME'];
        $endereco = $_SERVER ['REQUEST_URI'];
        $url = 'http://' . $server . $endereco;
        $url = substr($url, 0, strrpos($url, '/') + 1);
        ?>

        <div>
            <a class="easyui-linkbutton" href="<?php echo $url; ?>CadObras.php">Nova Estimativa</a>
            <a class="easyui-linkbutton" href="<?php echo $url; ?>ListarOrcs.php?UserId=<?php echo $session_id?>">Listar Estimativas</a>
        </div>
    </body>
    <script type="text/javascript" src="JScript/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="EasyUI/locale/easyui-lang-br.js"></script>
    <script type="text/javascript" src="EasyUI/jquery.easyui.min.js"></script>
</html>
